<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        th,tr,td{
            border: 1px solid blue;
            border-collapse: collapse;
            text-align: center;
        }
        table{
            border-collapse: collapse;
        }
    </style>
</head>
<body>
<h2><a href="/stu/add">添加学生</a></h2>
<hr>
<table border="1" width="500">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>地址</th>
        <th>操作</th>
    </tr>
    <%--list集合要遍历,需要jstl标签库--%>
    <c:forEach items="${stuList}" var="student">
        <tr>
            <td> ${student.id}</td>
            <td> ${student.name}</td>
            <td> ${student.age}</td>
            <td> ${student.sex}</td>
            <td>${student.address}</td>
            <td>
                <button class="select">查看</button>
                <a href="/stu/update/${student.id}">修改</a>
                <a href="/stu/delete/${student.id}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
    <script>
        let select = document.querySelector("button");
        function cl(){
            
        }
    </script>
</body>
</html>
